package com.singzi.javaSenior.reflect;



public class Person implements Cloneable {
    public void eat(){
        System.out.println("吃！......");
    }

    public static void main(String[] args) throws CloneNotSupportedException {
        Person person = new Person();
        person.eat();
        Person p = (Person) person.clone();
        p.eat();
    }

    @Override
    public Person clone() {
        try {
            return (Person) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }
}
